<?php
/**
 * +-------------------------------------------------------------
 * |Caption:
 * +-------------------------------------------------------------
 * |Author: Lenny
 * +-------------------------------------------------------------
 * |Email:  1685964109@qq.com
 * +-------------------------------------------------------------
 * |Date:   2024/8/8 下午2:37
 * +-------------------------------------------------------------
 */

namespace app\common\enum\order;

use MyCLabs\Enum\Enum;

class PayType extends Enum
{
    // 收款方式，1=现金（支付宝，微信，纸币等），2=公司账户，3=挂账、记账
    const CASH = 1;

    const BANK = 2;

    const GZ = 3;

    public static function getPayTypeText($value = ''): array|string
    {
        $data = [
            self::CASH => '现金',
            self::BANK => '公司账户',
            self::GZ => '挂账'
        ];
        if($value == ''){
            return $data;
        }
        return $data[$value] ?? '未知';
    }
}